﻿using System;
using System.Collections.Generic;
using System.Web.UI;
using DataObject.DataAccess;
using DataObject.Database;

public partial class Pages_Reservation_Reservation : Page
{
    public string BoardingDate
    {
        get { return Request["BoardingDate"]; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            List<BoatEntity> boats = BoatDAO.CreateInstant().GetAllBoats();
            ddlBoat.DataSource = boats;
            ddlBoat.DataTextField = "BoatName";
            ddlBoat.DataValueField = "BoatID";
            ddlBoat.DataBind();

            if (boats.Count > 0)
            {
                ddlBoat.SelectedIndex = 1;
            }
        }

        // this.txtDepartureDate.Text = 
        txtBoardDate.Text = BoardingDate;
    }
}